# NewsletterTlg

## About
This is newslettering app for Telegram. Allows to send message to a number of users automatically.
Just write authorization data, message text and give user's id or usernames to it.
Messages are sent in random intervals to be not blocked by Telegram.

## Getting started
At first clone project
```commandline
git clone https://gitverse.ru/sc/volkonsky13/NewsletterTlg.git
```
Install requirements
```commandline
pip install -r requirements.txt
```
After that create **config.json** file with your settings and write id and hash of your app and your message text. Here the example:
```json
{
  "api_id": 1111111,
  "api_hash": "your_secret_hash",
  "text": "Message_for_users"
}
```
Now you need create a **list.txt** file with usernames or Telegram ids:
```
123121241
some_username
another_username
64821487
```
## Run
After all above manipulations just start this app:
```commandline
python main.py
```
At first run you'll need to enter your mobile phone number and authorization code.
## Create app
You need to create your Telegram application. To do this go to [this link](https://core.telegram.org/api/obtaining_api_id). 
Scroll to the bottom and click **Creating an application**. Enter information about your app and after this you will get 
**API ID** and **API Hash** necessary for your app.